Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor HYPRE and ADIOS2 compilation issues #3022

Merged
merged 34 commits into from
Jan 24, 2025
Merged

Fix minor HYPRE and ADIOS2 compilation issues #3022

merged 34 commits into from
Jan 24, 2025

Conversation

ZedThree
Copy link
Member

@ZedThree ZedThree commented Nov 7, 2024

It turns out we're not building HYPRE on CI at all, and we're silently not actually using ADIOS2, and that's let a couple of compilation issues creep in.

This fixes the compilation and CI issues (hopefully).

@ZedThree
Copy link
Member Author

ZedThree commented Nov 8, 2024

Hmm, more problems with 3D metrics and the Hypre laplacians. Guess I'll have to build that config locally to fix them all.

@dschwoerer
Copy link
Contributor

It would be great to fix that, but I think disabling hypre with 3D is also fine. Hypre is often used - but only via PETSc, so that should be fine ...

So adding a configure time error should be fine ...

@ZedThree
Copy link
Member Author

I think it's mostly just making some types auto instead of Field2D or whatever, but I need to find some time to look into it

@dschwoerer
Copy link
Contributor

I have it fixed, so that it compiles.
I do not think it does the right think, as I need to change Field2D to FieldMetric in many places ...

@dschwoerer
Copy link
Contributor

Fixes #2701

bendudson and others added 12 commits January 9, 2025 10:44
Saved to dmp files by the Laplacian savePerformance monitor.
If the savePerformance() method is called to enable outputs,
the mean solver and AMG iterations, and the final residual,
are saved as time-varying scalars.
Default was "parallel_dirichlet", but no boundary is registered
with that name. Changed to "parallel_dirichlet_o2".
Calling `phiSolver->savePerformance(...)` causes performance (e.g. iteration count)
diagnostics to be saved to the output file.

hypre input did have the wrong parallel transform, boundary conditions
that have not been implemented. Now uses hypre3d as the phiSolver.
The combination doesn't yet work, so disable for now.
Add `override` keyword to squash warning.
- Mesh variable names are case sensitive
- mpirun needs ./ to find executable on some systems
Calls a Hypre function to print the matrix elements.
@ZedThree
Copy link
Member Author

Failing test is probably because ADIOS2 is missing from bout++Config.cmake.in -- need a find_dependency and set ADIOS2_ROOT or similar

* next:
  Prefer scientific notation
  Prefer scientific notation
  Prefer scientific notation
  Prefer scientific notation
  Prefer scientific notation
  pvpre library should link against pvode
  Update some copyright notices
  Replace finite() with std::isfinite()
  Use non-deprecated values also in input files
  update input files for deprecated options.
  Revert "update input files for deprecated options."
  update input files for deprecated options.
  Deprecate options that only use as default for other options.
@ZedThree
Copy link
Member Author

Failing on test-laplacexy2-hypre with OSError: ERROR: No data files found in path data, which is not terribly helpful.

Full error message:

33/63 Test #33: test-laplacexy2-hypre ...............***Failed   63.26 sec
Making LaplaceXY inversion test
Running LaplaceXY inversion test
   8 processors....
mpiexec -np 8 ./test-laplacexy laplacexy:core_bndry_dirichlet=true laplacexy:pf_bndry_dirichlet=true laplacexy:y_bndry_dirichlet=true f:bndry_xin=dirichlet f:bndry_xout=dirichlet f:bndry_yup=dirichlet f:bndry_ydown=dirichlet
Traceback (most recent call last):
  File "/home/runner/work/BOUT-dev/BOUT-dev/build/tests/integrated/test-laplacexy2-hypre/runtest", line 58, in <module>
    error = collect("max_error", path="data", info=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/BOUT-dev/BOUT-dev/tools/pylib/boutdata/collect.py", line 186, in collect
    file_list, parallel, _ = findFiles(path, prefix)
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/BOUT-dev/BOUT-dev/tools/pylib/boutdata/collect.py", line 1227, in findFiles
    raise IOError("ERROR: No data files found in path {0}".format(path))

@ZedThree
Copy link
Member Author

The test turns out to be failing because the solver wasn't converging. Switching laplacexy:hypre_solver_type to gmres fixes this.

The default HYPRE solver is bicgstab -- is this test an indication to change the default to gmres, or are we happy to just change the type for this test?

@ZedThree
Copy link
Member Author

Still having a weird issue with the coverage build

@ZedThree
Copy link
Member Author

Think this has finally fixed the issues I was originally trying to fix!

dschwoerer
dschwoerer previously approved these changes Jan 24, 2025
Copy link
Contributor

@dschwoerer dschwoerer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks 👍

@@ -190,9 +190,12 @@ endif()
message(STATUS "NetCDF support: ${BOUT_USE_NETCDF}")
set(BOUT_HAS_NETCDF ${BOUT_USE_NETCDF})

option(BOUT_USE_ADIOS2 "Enable support for ADIOS output" ON)
option(BOUT_USE_ADIOS2 "Enable support for ADIOS output" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if such feature would be automatically enabled if they are found.

@bendudson bendudson merged commit 1a002d2 into next Jan 24, 2025
26 of 27 checks passed
@bendudson bendudson deleted the fix-hypre branch January 24, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants